home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / c_toolbx.arc / GFOPEN.C86 < prev    next >
Encoding:
Text File  |  1988-03-30  |  520 b   |  25 lines

  1. /* gfopec.c - generalized buffer file open function    */
  2. /*          allows either Binary or ASCII treatment  */
  3. #include "stdio.h"
  4. #include "cminor.h"
  5.  
  6. /* Computer Innovarions version  */
  7.  
  8. FILE  *fopen()    ;
  9.  
  10. FILE  *gfopen(fn,fmode,ft)
  11.   char    fn[]  ;
  12.   char    fmode[]  ;
  13.   int    ft ;
  14.   {
  15.      char mode_string[20] ;
  16.  
  17.      strcopy(mode_string,fmode) ; /* copy input mode string */
  18.      if( ft == BIN_MODE )
  19.     strcat( mode_string,"b" )  ;
  20.      return( fopen(fn,mode_string )  ;
  21.   }
  22. /* end of version */
  23.  
  24.  
  25.